const query = require('../db/query');

module.exports = (req,res)=>{
    //查询数据库信息
    query('SELECT * FROM blog_article').then((result)=>{
        let renderData = {
            title:"我的博客",
            articles:result
        }
        res.render("index",renderData);
    })
}